package com.ls.springbootfast.controller;

import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @auther Administrator
 * @create.2021/9/8
 */
@RestController
@Setter
@ConfigurationProperties(prefix = "people")
public class HelloController1 {
    private String name;
    private int age;

//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public void setAge(int age) {
//        this.age = age;
//    }

    @RequestMapping("/hello3")
    @ResponseBody
    public String hello1(){
        return "访问成功"+"name:"+name+"  "+"age:"+age;
//        return "hello";
    }
}
